]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Don't display timed login indicator if unused
authorverdre <verdre@v0yd.nl>
Sat, 7 Apr 2018 19:23:13 +0000 (21:23 +0200)
committerverdre <gitlab@v0yd.nl>
Thu, 19 Apr 2018 15:26:14 +0000 (17:26 +0200)
This fixes the slightly bigger padding underneath the login item compared to the padding above

js/gdm/loginDialog.js

index 052a1d814e07618e67418299d6550014970f430a..bf796770080a49120b11963e13334c02c9f6caab 100644 (file)
@@ -85,7 +85,8 @@ var UserListItem = new Lang.Class({
                                              GObject.BindingFlags.SYNC_CREATE);
 
         this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
-                                                 scale_x: 0 });
+                                                 scale_x: 0,
+                                                 visible: false });
         layout.add(this._timedLoginIndicator);
 
         this.actor.connect('clicked', this._onClicked.bind(this));
@@ -125,6 +126,8 @@ var UserListItem = new Lang.Class({
 
         this.hideTimedLoginIndicator();
 
+        this._timedLoginIndicator.visible = true;
+
         let startTime = GLib.get_monotonic_time();
 
         this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33,
@@ -151,6 +154,8 @@ var UserListItem = new Lang.Class({
             GLib.source_remove(this._timedLoginTimeoutId);
             this._timedLoginTimeoutId = 0;
         }
+
+        this._timedLoginIndicator.visible = false;
         this._timedLoginIndicator.scale_x = 0.;
     }
 });